From 202f5a0b35013c000c99b282e75fc7e80f427227 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Wed, 19 Apr 2006 22:19:41 +0100 Subject: [PATCH] The Xen Hypervisor currently operates a bit differently when the guest is being debugged. The differences are handling of int3 exception and missed pit timer injections. The Xen hypervisor should get back to the normal mode when the gdb connection is closed. With the attached patch gdbserver properly detaches from the guest when the gdb detaches or quits. Signed-Off-By: Nitin A Kamble --- .../gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/server.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/server.c b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/server.c index 3e1f50ea49..492aab47c0 100644 --- a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/server.c +++ b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/server.c @@ -664,17 +664,13 @@ main (int argc, char *argv[]) For the traditional remote protocol close the connection, and re-open it at the top of the loop. */ - if (extended_protocol) - { - remote_close (); + detach_inferior (); + remote_close (); + if (extended_protocol) exit (0); - } - else - { + else fprintf (stderr, "Remote side has terminated connection. " "GDBserver will reopen the connection.\n"); - remote_close (); - } sigaction(SIGINT, &old_sigaction, NULL); } } -- 2.30.2